import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 全局引入axios
import axios from 'axios';
// axios.defaults.baseURL=`http://127.0.0.1:8001/`
axios.defaults.baseURL=`http://39.104.164.55:8001/`
import VueAxios from 'vue-axios';
Vue.use(VueAxios,axios)
// 全局引入mint-UI
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)
// 引入moment
import moment from "moment";
Vue.prototype.$moment = moment;
// 引入socket.io
import VueSocketIO from 'vue-socket.io'
import SocketIO from 'socket.io-client'

Vue.use(
  new VueSocketIO({
    debug: false,
    connection: SocketIO('http://39.104.164.55:3000', {
      autoConnect: false // 取消自动连接     
    }),
    extraHeaders: { 'Access-Control-Allow-Origin': '*' }
  })
)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
